package
{
	import away3d.containers.ObjectContainer3D;
	import away3d.materials.BitmapMaterial;
	import away3d.primitives.Plane;
	import away3d.primitives.Trident;
	import flash.display.Bitmap;
	import flash.events.Event;
	
	public class Test1 extends CustomWorld3D
	{
		[Embed(source="../bin/student.csv",mimeType="application/octet-stream")]
		private var csvText:Class;
		
		[Embed(source="../bin/texture/iscript.png")]
		private var iscriptImage:Class;
		private var t:Trident = new Trident(200);
		
		private var ObjCon3D:ObjectContainer3D; 
		public function Test1()
		{
		}
		
		override public function initialize():void
		{
			super.initialize();
			center(stage);
			
			ObjCon3D = new ObjectContainer3D();
			view.scene.addChild(ObjCon3D);
			
			var image:Bitmap = new iscriptImage();
			var mat:BitmapMaterial = new BitmapMaterial(image.bitmapData);
			
			var plane:Plane = new Plane()
			plane.width = image.width;
			plane.height = image.height;
			//plane.material = new WireframeMaterial();
			plane.rotationX = 90;
			plane.bothsides = true;
			plane.material = mat;
			
			ObjCon3D.addChild(plane);
			ObjCon3D.addChild(t);
		}
		
		override protected function updateWorld3D(event:Event):void
		{
			ObjCon3D.rotationY++;
			
			super.updateWorld3D(event);
		
		}
	
	}

}